using namespace std;
#include <iostream>
#include <cmath>

int main()
{
  int curnum = 1, numinc = 2, numsucc = 0, check;
  while(1)
  {
    for(int i = 1; i < ( sqrt(curnum)); i++)
    {
      if((curnum % i) == 0)
	numsucc+=2;
      
    }

    check = sqrt(curnum);

    if(float(check) == sqrt(curnum))
      numsucc++;

    if(numsucc > 500)
    {
      cout << "Answer is : " << curnum << endl;
      return 0;
    }
    numsucc = 0;
    curnum += numinc;
    numinc++;
    if((curnum % 100) == 0)
    {
      cout << curnum << endl;
    }
  }
}
